//priority_queue.cpp


#include"priority_queue.h"

namespace My
{
	void test01()
	{
		priority_queue<int> q1;

		q1.push(50);
		q1.push(45);
		q1.push(40);
		q1.push(20);
		q1.push(25);
		q1.push(35);
		q1.push(30);
		q1.push(10);
		q1.push(15);

		/*cout << q1.size() << endl;*/

		while(!q1.empty())
		{
			cout << q1.top()<< " ";
			q1.pop();
		}
		cout << endl;
	}

	void test02()
	{
		

		vector<int> s1;
		s1.push_back(50);
		s1.push_back(45);
		s1.push_back(40);
		s1.push_back(20);
		s1.push_back(25);
		s1.push_back(35);
		s1.push_back(30);
		s1.push_back(10);
		s1.push_back(15);

		vector<int>::iterator  it = s1.begin();
		vector<int>::iterator  ite = s1.end();


		priority_queue<int> q1(it,ite);


		while (!q1.empty())
		{
			cout << q1.top() << " ";
			q1.pop();
		}
		cout << endl;
	}
}